<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="IndexUsuario.xhtml">

	<ui:define name="conteudo">
		<f:loadBundle basename="br.ucb.jogo.recursos.messages" var="msg" />
		<h:form id="form" rendered="true">
			<p:panel styleClass="FundoPaginaUsuario">
				<center>
				<br/><br/><br/><br/>
				<p:panel rendered="#{personagemManagedBean.criaPersonagem}" styleClass="PainelTrabalho">
					<center>
						<p:commandButton value="#{msg.CRIAR_PERSONAGEM} " label="#{msg.CRIAR_PERSONAGEM}" action="CriaPersonagem.jsf" rendered="#{personagemManagedBean.criaPersonagem}"/>
					</center>
				</p:panel>
				<p:panel rendered="#{personagemManagedBean.criaPersonagem2}" style="width:500px;">
					<center>
						<p:panelGrid columns="2" style="width:460px;">
									<p:panel>
										<h:outputLabel value="#{msg.LEVEL}: " />
											<h:outputText value="#{personagemManagedBean.personagem.level}" />	
									</p:panel>
									
									<p:panel>
										<h:outputLabel value="#{msg.NOME}: " />
										<h:outputText value="#{personagemManagedBean.personagem.nick}" />
									</p:panel>
						</p:panelGrid>
						<p:panelGrid columns="2">
							<p:panel>
								<p:graphicImage url="../images/personagem/#{personagemManagedBean.imagem}" />	
							</p:panel>
							<p:panelGrid columns="1">
								<p:panel>
									<h:outputLabel value="#{msg.FORCA}: " />
									<h:outputText value="#{personagemManagedBean.personagem.forca}" />	
								</p:panel>
								
								<p:panel>
									<h:outputLabel value="#{msg.DEFESA}: " />
									<h:outputText value="#{personagemManagedBean.personagem.defesa}" />	
								</p:panel>
								<p:panel>
									<h:outputLabel value="#{msg.AGILIDADE}: " />
									<h:outputText value="#{personagemManagedBean.personagem.agilidade}" />	
								</p:panel>
								<p:panel>
									<h:outputLabel value="#{msg.MANA}: " />
									<h:outputText value="#{personagemManagedBean.personagem.mana}" />	
								</p:panel>	
								<p:panel>
									<h:outputLabel value="#{msg.CASH}: " />
									<h:outputText value="#{personagemManagedBean.personagem.cash}" />	
								</p:panel>
								<p:panel>
									<h:outputLabel value="XP: " />
									<h:outputText value="#{personagemManagedBean.personagem.experiencia}" />
								</p:panel>					
							</p:panelGrid>
						</p:panelGrid>
						
						<p:commandButton value="desafiadoo" rendered="#{personagemManagedBean.desafio != null}" action="#{dueloManagedBean.carregaDesafios}"/>
					</center>
				</p:panel>
				</center>
			</p:panel>
		</h:form>
		
	</ui:define>

</ui:composition>
</html>
